package com.zy.cat.entity.dev.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import com.zy.cat.entity.dev.CatDevReRedHistory;
public interface CatDevReRedHistoryRepository extends JpaSpecificationExecutor<CatDevReRedHistory>,  JpaRepository<CatDevReRedHistory, String>{
	/*
	 * 查询返现红包列表
	 */
	List<CatDevReRedHistory> findByPidAndFstatus(String pid,Integer fstatus);
	
	/*
	 * 查询返现红包列表
	 */
	List<CatDevReRedHistory> findByPidAndFstatusAndPtype(String pid,Integer fstatus,Integer ptype);

	/**
	 * 获取用户红包数量
	 * @author lipengchao
	 * @date 2019-12-10 10:34:55
	 * @param pid
	 * @return
	 */
	int countByPid(String pid);
}
